#ifndef SEARCH_VISITOR_HPP_GUARD
#define SEARCH_VISITOR_HPP_GUARD

#include "kbase.hpp"
		
namespace mashine { namespace kb { 

class KnowledgeBase;		// for resolving cross-class dependency 

namespace search {

/**
 * this class provice interface that need realize to 
 * execute your own search way
 */
template<typename _KbEntity, typename _Criteria>
class SearchVisitor
{
protected:
	_Criteria criteria;
	
	SearchVisitor(_Criteria criteria) { this->criteria = criteria; }
	
public:
	_Criteria getCriteria() const { return criteria; }
	SearchVisitor * setCriteria(_Criteria criteria)
	{ 
		this->criteria = criteria; return this;
	}
	
	virtual std::vector<_KbEntity> search(mashine::kb::KnowledgeBase * kBase) = 0;
};

}

}}

#endif